home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
081-090
/
amok85
/
format&printf
/
format.mod
next >
Wrap
Text File
|
1993-11-04
|
3KB
|
121 lines
(*------------------------------------------
:Program. Format
:Author. Dieter Bogdoll [db]
:Address. SMail: Gudrunstr. 7, D-8000 München 19
:Address. EMail: landon@amc.zer
:Address. EMail: 2:246/221.3@fidonet
:Address. EMail: bogdoll@informatik.tu-muenchen.de
:Version. V1.0
:Date. 20-Feb-1993
:Copyright. Public Domain
:Language. Oberon
:Translator. Amiga Oberon 3.00d
:Support. Format aus io.mod, Printf: Volker Rudolph, hartmut Goebel [hG]
:Contents. Formatierbefehle aehnlich wie in io.mod oder sprintf aus Printf
:Remarks. Formatiersteuerung siehe Format aus io.mod
:Bugs. nicht ausfuehrlich getestet
:History. V0.0 [db] 15-Feb-1993 : Erstellt
:History. V1.0 [db] 20-Feb-1993 : Gebrauchsfertig
--------------------------------------------*)
MODULE Format;
(* $OvflChk- $RangeChk- $NilChk- $ReturnChk- $CaseChk- *)
IMPORT e := Exec, y := SYSTEM;
PROCEDURE RFProc; (* $EntryExitCode- *)
BEGIN
y.INLINE(016C0U, (* MOVE.B D0,(A3)+ *)
04E75U); (* RTS *)
END RFProc;
PROCEDURE Format0* (VAR str: ARRAY OF CHAR; form: ARRAY OF CHAR);
(* $CopyArrays- *)
BEGIN
e.RawDoFmt(form,NIL,RFProc,y.ADR(str));
END Format0;
PROCEDURE Format1* (VAR str: ARRAY OF CHAR; form: ARRAY OF CHAR; d1:e.APTR);
(* $CopyArrays- *)
VAR format: STRUCT d1 : e.APTR END;
BEGIN
format.d1 := d1;
e.RawDoFmt(form,y.ADR(format),RFProc,y.ADR(str));
END Format1;
PROCEDURE Format2* (VAR str: ARRAY OF CHAR; form: ARRAY OF CHAR; d1,d2:e.APTR);
(* $CopyArrays- *)
VAR format: STRUCT d1,d2 : e.APTR END;
BEGIN
format.d1 := d1;
format.d2 := d2;
e.RawDoFmt(form,y.ADR(format),RFProc,y.ADR(str));
END Format2;
PROCEDURE Format3* (VAR str: ARRAY OF CHAR; form: ARRAY OF CHAR; d1,d2,d3:e.APTR);
(* $CopyArrays- *)
VAR format: STRUCT d1,d2,d3 : e.APTR END;
BEGIN
format.d1 := d1;
format.d2 := d2;
format.d3 := d3;
e.RawDoFmt(form,y.ADR(format),RFProc,y.ADR(str));
END Format3;
PROCEDURE Format4* (VAR str: ARRAY OF CHAR; form: ARRAY OF CHAR; d1,d2,d3,d4:e.APTR);
(* $CopyArrays- *)
VAR format: STRUCT d1,d2,d3,d4 : e.APTR END;
BEGIN
format.d1 := d1;
format.d2 := d2;
format.d3 := d3;
format.d4 := d4;
e.RawDoFmt(form,y.ADR(format),RFProc,y.ADR(str));
END Format4;
PROCEDURE Format5* (VAR str: ARRAY OF CHAR; form: ARRAY OF CHAR;
d1,d2,d3,d4,d5:e.APTR);
(* $CopyArrays- *)
VAR format: STRUCT d1,d2,d3,d4,d5 : e.APTR END;
BEGIN
format.d1 := d1;
format.d2 := d2;
format.d3 := d3;
format.d4 := d4;
format.d5 := d5;
e.RawDoFmt(form,y.ADR(format),RFProc,y.ADR(str));
END Format5;
PROCEDURE Format6* (VAR str: ARRAY OF CHAR; form: ARRAY OF CHAR;
d1,d2,d3,d4,d5,d6:e.APTR);
(* $CopyArrays- *)
VAR format: STRUCT d1,d2,d3,d4,d5,d6 : e.APTR END;
BEGIN
format.d1 := d1;
format.d2 := d2;
format.d3 := d3;
format.d4 := d4;
format.d5 := d5;
format.d6 := d6;
e.RawDoFmt(form,y.ADR(format),RFProc,y.ADR(str));
END Format6;
PROCEDURE Format7* (VAR str: ARRAY OF CHAR; form: ARRAY OF CHAR;
d1,d2,d3,d4,d5,d6,d7:e.APTR);
(* $CopyArrays- *)
VAR format: STRUCT d1,d2,d3,d4,d5,d6,d7 : e.APTR END;
BEGIN
format.d1 := d1;
format.d2 := d2;
format.d3 := d3;
format.d4 := d4;
format.d5 := d5;
format.d6 := d6;
format.d7 := d7;
e.RawDoFmt(form,y.ADR(format),RFProc,y.ADR(str));
END Format7;
END Format.